package com.cf.docker.model;

import com.cf.code.core.CField;
import com.cf.code.core.CModel;
import com.cf.code.core.CPage;
import com.cf.crud.entity.BaseEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * boot-awm-Machine
 *
 * @author <a href="2428922347@qq.com">Zhu mingming</a>
 * @info
 * @since 2018/6/20 上午 11:33
 */

@Entity
@Table(name = "machine", uniqueConstraints = {
        @UniqueConstraint(columnNames = {"ip"})
})
@CModel(pages = {
        @CPage(title = "物理机列表", path = "machine", templateName = "list.ftl", outPutName = "list.ftl"),
        @CPage(title = "物理机", path = "machine", templateName = "add.ftl", outPutName = "add.ftl"),
        @CPage(title = "物理机", path = "machine", templateName = "update.ftl", outPutName = "update.ftl")
})
public class Machine extends BaseEntity {

    @CField(lab = "机器名字")
    @Column(name = "machineName")
    private String machineName;

    @CField(lab = "ip")
    @Column(name = "ip")
    private String ip;

    @CField(lab = "用户名")
    @Column(name = "userName")
    private String userName;

    @CField(lab = "密码")
    @Column(name = "password")
    private String password;

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getMachineName() {
        return machineName;
    }

    public void setMachineName(String machineName) {
        this.machineName = machineName;
    }
}
